package com.yc.cloud.openai.portal.enums;

import java.util.Objects;

import lombok.Getter;

@Getter
public enum PromptType {
    // 写实人物风格
    TEXT2IMAGE("1", "文生图"),
    TEXT2VIDEO("2", "文生视频"),
    IMAGE2MODEL("3", "图片转3D模型"),
    TEXT2MODEL("4", "文本转3D模型"),
    TEXT2SPEECH("5", "文本转语音"),
    IMAGE2VIDEO("6", "图片转视频");
    private final String key;
    private final String value;

    PromptType(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public static PromptType fromKey(String key) {
        for (PromptType provider : PromptType.values()) {
            if (Objects.equals(provider.getKey(), key)) {
                return provider;
            }
        }
        throw new IllegalArgumentException("Unknown key: " + key);
    }
}
